package com.heima.reflect;/**
* @Author: Ethan Yankang
*
* @Program: 面试必会代码
*
* @Date: 2024-08-31 10:19
**/
public class Student{
    public Student(){
        System.out.println("无参构造方法");
    }

    public Student(String name) {
        System.out.println("学生姓名:"+name);
    }
    public Student(String name,int age){
        System.out.println("学生姓名:"+name+",年龄:"+age);
    }
    protected Student(boolean n){
        System.out.println("受保护的构造方法: n="+n);
    }

    private Student(int age){
        System.out.println("私有的构造方法:"+age);
    }
}
